package com.toutoushidao.ssm;

/**
 * Created by ThinkPad on 2016/10/20.
 */
public class Global {
    public static final String SALT = "alskdjfoiew#$%&()578292";//生成用户Token时使用的盐
    public static final String TOKEN = "access_token";//传递Token使用的key

    public static final String PATH_LOGO = "/snake/snakelogo/";

    public static final String REDIS_KEY_BOARD = "SNAKE:BOARD";//缓存全局排行榜使用的key
    public static final String REDIS_KEY_CLICK = "SNAKE:CLICK:";//缓存分享链接点击的IP
    public static final String REDIS_KEY_CLICK_INVALID = "SNAKE:CLICK:INVALID";//已经失效的CODE
    public static final String REDIS_KEY_CLICK_VALID = "SNAKE:CLICK:VALID";//有效的CODE

    public static final String REDIS_KEY_GLOBAL_LENGTH_TIME_RANKING = "SNAKE:BOARD:LENGTH:TIME";//限时模式
    public static final String REDIS_KEY_GLOBAL_LENGTH__ENDLESS_RANKING = "SNAKE:BOARD:LENGTH:ENDLESS";//无限模式

    public static final int GLOBAL_BOARD_LIMIT = 200;
    public static final int FRIEND_BOARD_LIMIT = 200;


    /**
     * 系统默认值
     * TODO:改写到DB，定义启动时的servlet加载配置
     */
    public static final int DEFAULT_PAGE_COUNT = 1;//请求列表时每次返回的记录数量,因为不分页直接设置最大值
    public static final String DEFAULT_AVATAR = "avatar.jpg";//默认头像
    public static final int DEFAULT_CLICK_AWARD = 1;//默认点击一次链接的数量
    public static final int DEFAULT_CLICK_LIMIT = 100;//默认点击奖励上限
    public static final int DEFAULT_GLOBAL_BOARD_COUNT = 200;//默认点击奖励上限


    public static final Long DB_ROOT = 0L;//管理员ID
    public static final Long DB_EQUIPMENT_SKIN = 100L;//默认的皮肤分类ID
    public static final Long DB_EQUIPMENT_HOOD = 200L;//默认的头套分类ID

    public static final Long DB_EQUIPMENT_MALE = 220L;//默认装备ID(男)
    public static final Long DB_EQUIPMENT_FEMALE = 221L;//默认装备ID(女)

    public static final Integer DB_SEX_MALE = 0;
    public static final Integer DB_SEX_FEMALE = 1;

    public static final Integer DB_MODE_TIME = 0;
    public static final Integer DB_MODE_ENDLESS = 1;

    public static final int DB_CODE_TYPE_SHARE = 0;//user_code.type 分享

    public static final boolean DB_EQUIPMENT_USING = true;
    public static final boolean DB_EQUIPMENT_IDLE = false;


    public static final Integer DB_FRIEND_FLAG_REQUEST = 0;
    public static final Integer DB_FRIEND_FLAG_ACCEPT = 1;
    public static final Integer DB_FRIEND_FLAG_REJECT = 2;
    public static final Integer DB_FRIEND_FLAG_ACCEPTED = 3;
}
